<template>
	<div style="min-height:1000px;">
		<div v-for="item in 50" :key="item">
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
			<img src="https://upfile2.asqql.com/upfile/2009pasdfasdfic2009s305985-ts/gif_spic/2019-5/201951220511787223.gif" alt="" style="width:130px;" />
		</div>
	<div id="divMsgBottomInfo" runat="server"  style="right:100px; top:550px;">
		<h1 style="font-size: 30px;color:#FFFFFF">广告位招租</h1>
		<img src="https://lupic.cdn.bcebos.com/20210629/2001886797_14.jpg" style="width:330px; height:170px" />
	</div>
	</div>
</template>
<script>
	export default {
		name: 'SlideBar',
		data() {
			return {
			}
		},
		methods: {
			heartBeatBottom(){
					var isIE = document.all && window.external;
				var bodyScrollTop = document.documentElement?.scrollTop || document.body?.scrollTop;
				if(isIE){
					var docHeight = document.documentElement?.clientHeight || document.body?.clientHeight;
				}else{
					var docHeight = (document.body?.clientHeight > document.documentElement?.clientHeight)?document.documentElement?.clientHeight:document.body?.clientHeight;
				}
				var diffYBottom=(docHeight-400 - parseInt(document.getElementById("divMsgBottomInfo")?.offsetHeight,10)) + parseInt(bodyScrollTop, 10);
				document.getElementById("divMsgBottomInfo").style.top=diffYBottom+"px";
			}
		},
		mounted() {
			var timebottom=window.addEventListener("scroll",()=>{
				   clearTimeout(this.timer);
				          this.timer = setTimeout(() => {
							  this.$nextTick(()=>{
				           this.heartBeatBottom()
						   })
				          }, 10)
			});
		},
		destroyed(){
			window.removeEventListener('scroll', this.heartBeatBottom)
		}
	}
</script>
<style scoped>
	#divMsgBottomInfo{
		position:absolute;
		width:330px;
		height:188px;
		font-size:9pt;
	}
</style>
